package mk.com.ldm.corepoint.administration.client;

import java.util.ArrayList;
import java.util.Map;

import mk.com.ldm.corepoint.administration.shared.ConfigurationObject;
import mk.com.ldm.corepoint.administration.shared.DataBaseObject;
import mk.com.ldm.corepoint.administration.shared.EventObject;
import mk.com.ldm.corepoint.administration.shared.PermissionsObject;
import mk.com.ldm.corepoint.administration.shared.SimpleObject;
import mk.com.ldm.corepoint.administration.shared.TableData;
import mk.com.ldm.corepoint.administration.shared.UserObject;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("coreService")
public interface CoreService extends RemoteService {
	String login(String username, String Password);
	Boolean loginCheck(String username, String hash);
	ArrayList<?> mapObject(String objectName, String type, String username);
	ArrayList<String> getProjects();
	Boolean createProject(String name);
	boolean generateUserAndPermissionsMap(UserObject user);
	boolean generateConfigurationMap(String objectName, String username, ArrayList<ConfigurationObject> items, ArrayList<Boolean> simple);
	boolean generateSimpleMap(String objectName, String username, ArrayList<SimpleObject> items);
	boolean generatePermissionsMap(String username, ArrayList<PermissionsObject> items);
	boolean generateEventMap(String objectName, ArrayList<EventObject> items);
	String selectProject(String projectName);
	boolean createDataBase(String name);
	ArrayList<UserObject> getUsers();
	Map<String, String> getKeyValuePairFromTable(String table, ArrayList<DataBaseObject> columns);
	ArrayList<TableData> getTableData(String table, ArrayList<DataBaseObject> columns, boolean displayConditions);
	boolean generateApplicationMap(ArrayList<String> settings);
}